﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.DTO {
	/// <summary>
	/// 支付请求参数
	/// </summary>
	public class ky_quick : ky_head_query {
		public ky_quick() {
			ver = "1.0.5";
		}
		/// <summary>
		/// 出款类型：t0或t1
		/// </summary>
		public string paychannelcode { get; set; }
		/// <summary>
		/// 订单的金额，如：10.00元填写1000单位为分
		/// </summary>
		public string money { get; set; }
		/// <summary>
		/// 商品名称
		/// </summary>
		public string body { get; set; }
		/// <summary>
		/// 支付完成后将由接口方回调该链接
		/// </summary>
		public string notify_url { get; set; }
		/// <summary>
		/// 支付完成后前端跳转地址
		/// </summary>
		public string fronturl { get; set; }
		/// <summary>
		/// 清算通知地址：n
		/// </summary>
		public string clearnotifyurl { get; set; }
		/// <summary>
		/// 手续费。手续费不能小于平台给商户的成本手续费，如订单金额为10元，费率0.003，那么手续费等于10*100*0.003=3（单位为分）
		/// </summary>
		public string userfee { get; set; }
		/// <summary>
		/// 商户userappcode，可在商户后台查看：n
		/// </summary>
		public string userappcode { get; set; }
		/// <summary>
		/// 支付银行卡号，传入此参数则用户只能用此银行卡号进行支付
		/// </summary>
		public string paybanknum { get; set; }
		/// <summary>
		/// 收款银行名称，如建设银行
		/// </summary>
		public string bankname { get; set; }
		/// <summary>
		/// 收款银行卡号
		/// </summary>
		public string banknum { get; set; }
		/// <summary>
		/// 收款人身份证号码
		/// </summary>
		public string idcard { get; set; }
		/// <summary>
		/// 收款人姓名
		/// </summary>
		public string name { get; set; }
		/// <summary>
		/// N
		/// </summary>
		public string drbankcode { get; set; }
	}

	/// <summary>
	/// 快捷公共
	/// </summary>
	public class ky_head_query {
		public ky_head_query() {
#if DEBUG
			merno = "ceshi";
#else
			merno = "shangfubao";
#endif
		}
		/// <summary>
		/// 商户号，由接口方提供
		/// </summary>
		public string merno { get; set; }
		/// <summary>
		/// 商户订单号为不可重复字段（当前商户内唯一）建议长度16到24位
		/// </summary>
		public string trans_id { get; set; }
		/// <summary>
		/// 版本
		/// </summary>
		public string ver { get; set; }
		/// <summary>
		/// sign
		/// </summary>
		public string sign { get; set; }
		/// <summary>
		/// 为随机字符串，以保证唯一性
		/// </summary>
		public string random { get; set; }
	}

	/// <summary>
	/// 快捷支付异步响应
	/// </summary>
	public class ky_quick_result {
		/// <summary>
		/// 状态  0失败  1入账成功，出,账失败  2入账成功，出账成功（一个接口直接进出的时候才可能返回1，2）
		/// </summary>
		public int status { get; set; }
		/// <summary>
		/// 支付金额，单位：分
		/// </summary>
		public int total_fee { get; set; }
		/// <summary>
		/// 提示消息
		/// </summary>
		public string msg { get; set; }
		/// <summary>
		/// 商户订单号（您传入的）
		/// </summary>
		public string out_trade_no { get; set; }
		/// <summary>
		/// 接口方返回给您的交易订单号
		/// </summary>
		public string trade_no { get; set; }
		/// <summary>
		/// sign
		/// </summary>
		public string sign { get; set; }
		/// <summary>
		/// 可能空值
		/// </summary>
		public string paychannelcode { get; set; }
	}

	/// <summary>
	/// 快捷查询响应
	/// </summary>
	public class ky_quick_query {
		/// <summary>
		/// 数据返回状态 0失败  1成功
		/// </summary>
		public int Status { get; set; }
		/// <summary>
		/// 提示信息
		/// </summary>
		public string Msg { get; set; }
		/// <summary>
		/// 商户订单号
		/// </summary>
		public string OutTradeNo { get; set; }
		/// <summary>
		/// 交易订单号
		/// </summary>
		public string TradeNo { get; set; }
		/// <summary>
		/// 入款状态  1未入款  2已入款3审查中（某些特殊接口需要发送请求确认是否成功）
		/// </summary>
		public int TheState { get; set; }
		/// <summary>
		/// 总金额（分）
		/// </summary>
		public int Amount { get; set; }
		/// <summary>
		/// 消费金额（分）
		/// </summary>
		public int AmountFee { get; set; }
		/// <summary>
		/// 退款金额（分）
		/// </summary>
		public int RefundFee { get; set; }
		/// <summary>
		/// 下单时间
		/// </summary>
		public DateTime OrderTime { get; set; }
		/// <summary>
		/// 交易成功时间
		/// </summary>
		public string TransactionCloseTime { get; set; }
		/// <summary>
		/// 交易渠道编码
		/// </summary>
		public string PayChannelCode { get; set; }
		/// <summary>
		/// 出款状态  1未出款 2已出款
		/// </summary>
		public int TheSettleState { get; set; }
		/// <summary>
		/// 是否通知成功  1通知成功0未通知成功
		/// </summary>
		public int IsNotifySuccess { get; set; }
		/// <summary>
		/// 银联等
		/// </summary>
		public string PayChannelName { get; set; }
	}
}
